package org.csmz.xg2333;

public class Book {
    public String bookName;
    public String bookUser;
    public  String bookNum;

    public Book(){
        System.out.println("这是一本书");//无构造方法
    }
    public Book(String bookName,String bookUser,String bookNum){
        this.bookName = bookName;
        this.bookNum = bookNum;
        this.bookUser = bookUser;
    }
    public void print1(){
        System.out.println("书名为："+bookName+"\n作者是："+bookUser);
        //this 调用成员方法
        this.print2();
    }
    public void print2(){
        System.out.println("页数有："+bookNum);
    }

}
